package com.exmaple.MysqlMasterAndSlave;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @author Liuqz
 * @date 2018/12/22 15:28
 */
public class DynamicDataSource extends AbstractRoutingDataSource {


    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDataSoucreHolder.getDbType();
    }
}
